DO $$ BEGIN
   IF NOT EXISTS(SELECT 1 FROM pg_roles WHERE rolname = 'bob') THEN
      CREATE ROLE sam WITH LOGIN PASSWORD 'password12345' CREATEDB;
   END IF;
END $$;
